package com.ruoyi.biz.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 新闻管理对象 biz_news
 *
 * @author chensw
 * @date 2023-06-30
 */
public class BizNews extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 新闻编号 */
    @Excel(name = "新闻编号")
    private Long newId;

    /** 新闻标题 */
    @Excel(name = "新闻标题")
    private String title;

    /** 新闻内容 */
    @Excel(name = "新闻内容")
    private String contents;

    /** 新闻日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "新闻日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishDate;

    /** 类型编号 */
    @Excel(name = "类型编号")
    private Long categoryId;

    /** 新增一个属性用于保存分类的名称，并进行封装 */
    private String categoryName;


    /** 发布状态 */
    @Excel(name = "发布状态")
    private String status;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public void setNewId(Long newId)
    {
        this.newId = newId;
    }

    public Long getNewId()
    {
        return newId;
    }
    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getTitle()
    {
        return title;
    }
    public void setContents(String contents)
    {
        this.contents = contents;
    }

    public String getContents()
    {
        return contents;
    }
    public void setPublishDate(Date publishDate)
    {
        this.publishDate = publishDate;
    }

    public Date getPublishDate()
    {
        return publishDate;
    }
    public void setCategoryId(Long categoryId)
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId()
    {
        return categoryId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("newId", getNewId())
                .append("title", getTitle())
                .append("contents", getContents())
                .append("publishDate", getPublishDate())
                .append("categoryId", getCategoryId())
                .append("categoryName", getCategoryName())
                .append("status", getStatus())
                .toString();
    }
}
